package main;

import java.awt.*;

public class Archer extends LivingEntity {
    public Archer(Image left, Image stepLeft, Image right, Image stepRight, Image stay) {
        super(left, stepLeft, right, stepRight, stay, 64 , -64);

    }






    @Override
    public void update() {
        super.update();




        if (locateIn(256, Register.ZOMBIE) && !locateIn(128, Register.ZOMBIE))
            flagToZombie = true;



        if ( flagToZombie ) {


            goTo(Register.ZOMBIE.posX, Register.ZOMBIE.posY);

        } else {

            walk(Game.random.nextInt(100) == 0);

        }



    }




}
